import service from './request'

export function getConfig (params = {}) {
  return service({
    url: '/config',
    method: 'get',
    params,
  })
}
export function login (data) {
  return service({
    url: '/login',
    method: 'post',
    data,
  })
}

export function getInfo (params = {}) {
  return service({
    url: '/user/info',
    method: 'get',
    params,
  })
}

export function getUserList (params) {
  return service({
    url: '/user',
    method: 'get',
    params,
  })
}

export function userCreate (user) {
  return service({
    url: '/user',
    method: 'post',
    data: user,
  })
}

export function userEdit (user) {
  return service({
    url: '/user/update',
    method: 'post',
    data: user,
  })
}

export function userDelete (ids) {
  return service({
    url: '/user/delete',
    method: 'post',
    data: { ids },
  })
}

export function sendMessage () {
  return service({
    url: '/chat',
    method: 'get',

  })
}
